import request from "@/utils/request";

/**
 * 获取会员列表
 */
export function getMemberList(params) {
  return request({
    url: "/member/info/page/list",
    method: "post",
    data: params
  });
}
/**
 * 更新会员信息
 */
export function updateMemberInfo(params) {
  return request({
    url: "/member/info/update",
    method: "post",
    data: params
  });
}

/**
 * 会员启用
 */
export function enableMemberInfo(params) {
  return request({
    url: "/member/info/enable",
    method: "get",
    params
  });
}
/**
 * 会员禁用
 */
export function disableMemberInfo(params) {
  return request({
    url: "/member/info/disable",
    method: "get",
    params
  });
}

/**
 * 会员删除
 */
export function deleteMemberInfo(params) {
  return request({
    url: "/member/info/delete",
    method: "get",
    params
  });
}

/**
 * 银行卡列表
 */
export function bankMemberInfo(params) {
  return request({
    url: "/member/info/bank/info",
    method: "get",
    params
  });
}

/**
 * 重置佣金
 */
export function resetCommission(params) {
  return request({
    url: "/member/info/rebate/reset",
    method: "get",
    params
  });
}

/**
 * 撤销重置佣金
 */
export function revokeResetCommission(params) {
  return request({
    url: "/member/info/rebate/reset/revoke",
    method: "get",
    params
  });
}

/**
 * 增加会员金额
 */
export function addMemberMoney(params) {
  return request({
    url: "/member/info/money/add",
    method: "post",
    data: params
  });
}

/**
 * 减少会员金额
 */

export function reduceMemberMoney(params) {
  return request({
    url: "/member/info/money/reduce",
    method: "post",
    data: params
  });
}

//签到会员列表
export function signMemberList(params) {
  return request({
    url: "/member/sign/list",
    method: "get",
    params
  });
}

//签到会员奖励列表
export function signMemberPageList(data) {
  return request({
    url: "/member/sign/page/list",
    method: "post",
    data
  });
}

// 添加会员签到
export function addSignMember(params) {
  return request({
    url: "/member/sign/add",
    method: "post",
    data: params
  });
}

/**
 * 团队 信息 列表
 */
export function teamMemberInfo(params) {
  return request({
    url: "/member/info/team/info",
    method: "post",
    data: params
  });
}

/**
 * 团队 直推信息 列表
 */
export function teamMemberBelow(params) {
  return request({
    url: "/member/info/below/info",
    method: "post",
    data: params
  });
}

//封禁会员团队
export function disableMemberTeam(params) {
  return request({
    url: "/member/info/team/disable",
    method: "get",
    params
  });
}

/**
 *  账变列表
 */
export function balanceMemberInfo(params) {
  return request({
    url: "/member/info/balance/log",
    method: "post",
    data: params
  });
}

/**
 * 获取会员等级列表
 */
export function getMemberLevelList(params) {
  return request({
    url: "/member/level/page/list",
    method: "post",
    data: params
  });
}

/**
 * 更新会员等级
 */
export function updataMemberLeve(params) {
  return request({
    url: "/member/level/update",
    method: "post",
    data: params
  });
}

/**
 * 修改用户密码
 */
export function updataUserPwd(params) {
  return request({
    url: "/member/info/update/user/pwd",
    method: "post",
    data: params
  });
}

/**
 * 修改支付密码
 */
export function updataCashPwd(params) {
  return request({
    url: "/member/info/update/cash/pwd",
    method: "post",
    data: params
  });
}

//用户连单信息
export function getMemberOrderInfo(params) {
  return request({
    url: "/member/info/stuck/order/info",
    method: "get",
    params
  });
}

/**
 * 用户连单替换
 */
export function replaceMemberOrder(params) {
  return request({
    url: "/member/info/stuck/order/replace",
    method: "post",
    data: params
  });
}

/**
 * 用户连单新增
 */
export function addMemberOrder(params) {
  return request({
    url: "/member/info/stuck/order/add",
    method: "post",
    data: params
  });
}

/**
 * 用户连单取消
 */

export function cancelMemberOrder(params) {
  return request({
    url: "/member/info/stuck/order/cancel",
    method: "get",
    params
  });
}

/**
 * 意见反馈列表
 */
export function getFeedbackList(params) {
  return request({
    url: "/member/feedback/page/list",
    method: "post",
    data: params
  });
}

/**
 * 获取收款信息
 */
export function getBankInfo(params) {
  return request({
    url: "/bank/info/info",
    method: "get",
    params
  });
}

/**
 * 修改收款信息
 */
export function updateBankInfo(params) {
  return request({
    url: "/bank/info/update",
    method: "post",
    data: params
  });
}

/**
 * 广告配置列表
 */
export function getGoodsConfigPageList(params) {
  return request({
    url: "/member/goods/config/page/list",
    method: "post",
    data: params
  });
}

/**
 * 广告配置列表
 */
export function getGoodsConfigList(params) {
  return request({
    url: "/member/goods/config/list",
    method: "get",
    params
  });
}

/**
 * 删除广告配置
 */
export function deleteGoodsConfig(params) {
  return request({
    url: "/member/goods/config/delete",
    method: "get",
    params
  });
}

/**
 * 删除广告配置
 */
export function sortGoodsConfig(data) {
  return request({
    url: "/member/goods/config/sort",
    method: "post",
    data
  });
}

/**
 * 添加广告配置
 */
export function addGoodsConfig(data) {
  return request({
    url: "/member/goods/config/add",
    method: "post",
    data
  });
}

/**
 * 派发广告
 */
export function dispatchGoodsConfig(data) {
  return request({
    url: `/member/goods/config/state/dispatch`,
    method: "post",
    data
  });
}

/**
 * 取消派发
 */
export function cancelGoodsConfig(data) {
  return request({
    url: `/member/goods/config/state/cancel`,
    method: "post",
    data
  });
}
